package com.递归2;

public class 反转字符串2 {
    public static class Solution{
        public static void reserve(String str){
         reserve2(str,-1);
        }
        public static void reserve2(String str,int index){
            if(index >= str.length()-1){
               return;
            }

             reserve2(str,++index);
            System.out.print(str.charAt(index)+"");

        }

        public static void main(String[] args) {
            reserve("我爱你");
        }
    }


}
